<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改信息</title>
<style type="text/css">
	#yjc{
		width: 400px;
		height: 240px;
		margin: 0px;
		padding: 30px 0;
	}
	#xpz{
		margin-top: 80px;
	}
	body{
		background-color:#FFF5EE;
	}
</style>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
function yanz(){
	var a = document.forms["myForm"]["name"].value;
	var b = document.forms["myForm"]["pwd"].value;
	var c = document.forms["myForm"]["phone"].value;
	var d = document.forms["myForm"]["dz"].value;
	if(a==""||a==null){
		alert("姓名未输入！");
		return false;
	}else if(b==""||b==null){
		alert("密码未输入！");
		return false;
	}else if(c==""|ce==null){
		alert("手机号未填！");
		return false;
	}else if(!(/^[0-9][0-9]*$/.test(c))||e.length!=11){
		alert("请输入正确位数的手机号！");
		return false;
	}else if(d==""||d==null){
		alert("请输入地址！");
		return false;
	}else{
		alert("新增用户成功！");
		return true;
	}
}
</script>
</head>
<body>
<center>
<div id="xpz">
	<img alt="" src="beijing/logo.jpg" width="650px" height="180px">
</div>
<div id="yjc">
	<form  name="myForm" action="${pageContext.request.contextPath}/Suoyou?method=save" method="post" onsubmit="return yanz()">
		<input name = "id" value="${str.id }" type="hidden">
		<table>		
			<tr>
				<td>姓名:</td>
			</tr>
			<tr>
				<td>
					<input name="name" value="${str.name}" type="text">
				</td>
			</tr>
			<tr>
				<td>密码:</td>
			</tr>
			<tr>
				<td>
					<input name="pwd" value="${str.pwd}" type="text">
				</td>
			</tr>
			<tr>
				<td>手机号:</td>
			</tr>
			<tr>
				<td>
					<input name="phone" value="${str.phone}" type="text">
				</td>
			</tr>
			<tr>
				<td>地址:</td>
			</tr>
			<tr>
				<td>
					<input name="dz" value="${str.dz}" type="text" >
				</td>
			</tr>
			<tr></tr><tr></tr><tr></tr>
			<tr>
				<td>
					<input type="submit" value="提交" onclick="myFunction(this.value)">&nbsp;
					<input type="reset" value="重置">&nbsp;
					<input type="button" value="返回" onclick="window.location='Suoyou'">	
				</td>
			</tr>
		</table>		
	</form>
</div>
</center>	
</body>
</html>